package com.yuetong.inventory.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuetong.common.annotation.Excel;
import com.yuetong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 出入库记录对象 yt_inventory_history
 *
 * @author  卓晓君
 * @date 2025-03-21
 */
public class YtInventoryHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 交易标识符 */
    private Long historyId;

    /** 关联库存ID */
    private Long inventoryId;

    /** 关联维修记录ID */
    private Long recordId;

    /** 库存类型 */
    @Excel(name = "库存类型")
    private String stockType;

    /** 库存变化类型 */
    @Excel(name = "库存变化类型")
    private String changeType;

    /** 库存变化 */
    @Excel(name = "库存变化")
    private BigDecimal quantity;

    /** 更新前数量 */
    @Excel(name = "更新前数量")
    private BigDecimal beforeQuantity;

    /** 更新后数量 */
    @Excel(name = "更新后数量")
    private BigDecimal afterQuantity;

    /** 金额 */
    @Excel(name = "金额")
    private BigDecimal amount;

    /** 出入库说明 */
    @Excel(name = "出入库说明")
    private String explanation;

    /** 出入库日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出入库日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionDate;

    /** 图片附件 */
    @Excel(name = "图片附件")
    private String images;

    /** 其他附件 */
    @Excel(name = "其他附件")
    private String files;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setHistoryId(Long historyId)
    {
        this.historyId = historyId;
    }

    public Long getHistoryId()
    {
        return historyId;
    }
    public void setInventoryId(Long inventoryId)
    {
        this.inventoryId = inventoryId;
    }

    public Long getInventoryId()
    {
        return inventoryId;
    }
    public void setRecordId(Long recordId)
    {
        this.recordId = recordId;
    }

    public Long getRecordId()
    {
        return recordId;
    }
    public void setStockType(String stockType)
    {
        this.stockType = stockType;
    }

    public String getStockType()
    {
        return stockType;
    }
    public void setChangeType(String changeType)
    {
        this.changeType = changeType;
    }

    public String getChangeType()
    {
        return changeType;
    }
    public void setQuantity(BigDecimal quantity)
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity()
    {
        return quantity;
    }
    public void setBeforeQuantity(BigDecimal beforeQuantity)
    {
        this.beforeQuantity = beforeQuantity;
    }

    public BigDecimal getBeforeQuantity()
    {
        return beforeQuantity;
    }
    public void setAfterQuantity(BigDecimal afterQuantity)
    {
        this.afterQuantity = afterQuantity;
    }

    public BigDecimal getAfterQuantity()
    {
        return afterQuantity;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setExplanation(String explanation)
    {
        this.explanation = explanation;
    }

    public String getExplanation()
    {
        return explanation;
    }
    public void setTransactionDate(Date transactionDate)
    {
        this.transactionDate = transactionDate;
    }

    public Date getTransactionDate()
    {
        return transactionDate;
    }
    public void setImages(String images)
    {
        this.images = images;
    }

    public String getImages()
    {
        return images;
    }
    public void setFiles(String files)
    {
        this.files = files;
    }

    public String getFiles()
    {
        return files;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("historyId", getHistoryId())
                .append("inventoryId", getInventoryId())
                .append("recordId", getRecordId())
                .append("stockType", getStockType())
                .append("changeType", getChangeType())
                .append("quantity", getQuantity())
                .append("beforeQuantity", getBeforeQuantity())
                .append("afterQuantity", getAfterQuantity())
                .append("amount", getAmount())
                .append("explanation", getExplanation())
                .append("transactionDate", getTransactionDate())
                .append("images", getImages())
                .append("files", getFiles())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
